import * as API from '@/api/common/index.js'

export async function getRootApi(params) {              //获取用户权限账号
    return  await API.GET("/v1/flash/positions",{})
};

export async function getAccountListApi(params) {              //账号管理==>查询账号列表
    return  await API.GET("/v1/flash/accounts",{})
};

export async function addAccountApi(params) {              //账号管理==>添加账号
    return  await API.POST("/v1/flash/accounts",params)
};

export async function editAccountApi(params) {              //账号管理==>修改账号
    return  await API.PUT("/v1/flash/accounts",params)
};

export async function getCharacterAPI(params) {              //获取角色管理界面
    return  await API.GET("/v1/flash/positions",params)
};

export async function editCharacterAPI(params) {              //修改角色管理界面
    return  await API.PUT("/v1/flash/positions",params)
};
export async function addermissionsApi(params) {              //新增角色管理界面
    return  await API.POST("/v1/flash/positions",params)
};

export async function getpermissionsApi(params) {              //获取权限配置
    return  await API.GET("/v1/flash/permissions",params)
};

export async function addSysConfig(params) {              //添加系统配置
    return  await API.POST("/v1/flash/configs",params)
};

export async function addCharacterAPI(params) {              //角色管理页面添加角色
    return  await API.POST("/v1/flash/permissions",params)
};

export async function editPassword(params) {              //修改密码
    return  await API.PUT("/v1/flash/accounts/password",params)
};

export async function resetPassword(params) {              //重置密码
    return  await API.GET("/v1/flash/accounts/reset",params)
};


